<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>关闭广告</title>
    <link rel="stylesheet" href="base.css">
    <style>
        .qecode{
            width: 114px;
            position: relative;
            background-color: red;
        }
        #code{
            width: 100px;
            position: absolute;
            right: 0;
        }
        #close{
            position: absolute;
            border: 1px solid red;
            cursor: pointer;/*箭头*/
        }
    </style>
</head>
<body>
    <div class="qecode">
        <img src="img/brand_goods_1.jpg" alt="" id="code">
        <span id="close">X</span>
    </div>
    <script>
        var closeSpan = document.getElementById('close');
        var qecode = document.querySelector('.qecode');
        closeSpan.onclick = function(){
            qecode.style.display = 'none';
        }
    </script>
</body>
</html>